package com.blr.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: HelloController
 * Description:
 * Date: 2022/11/15 PM 10:00:36
 * <p>
 * project: codes
 * package: com.blr.controller
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@RestController
public class HelloController {

    /**
     * /admin/** ROLE_ADMIN
     * /user/**  ROLE_USER
     * /guest/** ROLE_USER ROLE_GUEST
     * <p>
     * admin    ADMIN USER
     * user     USER
     * blr      GUEST
     *
     * @return string
     */
    @RequestMapping("/admin/hello")
    public String admin() {
        return "hello admin";
    }

    @RequestMapping("/user/hello")
    public String user() {
        return "hello user";
    }

    @GetMapping("/guest/hello")
    public String guest() {
        return "hello guest";
    }

    @RequestMapping("/hello")
    public String hello() {
        return "hello";
    }
}
